A gallium nitride field effect transistor (GaN FET) may have traps in semiconductor layers below the two-dimensional electron gas which cause undesirable instabilities during operation.